package com.atguigu.upp.utils;

import java.util.ResourceBundle;

/**
 * Created by Smexy on 2022/9/9
 *
 *      读取配置文件中的属性值
 */
public class PropertiesUtil
{
    //传入要读取的 properties文件的名字，无需传入后缀
    // 类似map
    private static ResourceBundle bundle = ResourceBundle.getBundle("config");

    public static String getValue(String name){

       return bundle.getString(name);

    }

    public static void main(String[] args) {

        System.out.println(getValue("masterUrl"));

    }
}
